package ui.custom.label;

import java.awt.Dimension;
import java.awt.Font;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;

public class AttLabel extends JLabel {

	private static final long serialVersionUID = 1L;
	
	public static final Dimension BAR = new Dimension(50, 30);

	public static final int FONT_SIZE = 12;

	public static final int ALLIGN = SwingConstants.RIGHT;

	public static final int FONT_STYLE = Font.BOLD;

	public AttLabel(String text, int horzAlign, int font, int size, Dimension d) {
		super(text, horzAlign);
		this.setPreferredSize(d);
		this.setFont(new Font("Arial", font, size));
		
		EmptyBorder eBorder = new EmptyBorder(0, 0, 0, 10); // up, right, bottom, left 
        LineBorder lBorder = new LineBorder(UIManager.getColor("Label.background")); 
        setBorder(BorderFactory.createCompoundBorder(lBorder, eBorder)); 
        
	}
	
	public AttLabel(String text, int horzAlign, int font, int size) {
		super(text, horzAlign);
		this.setPreferredSize(new Dimension(110, 30));
		this.setFont(new Font("Arial", font, size));
		
		EmptyBorder eBorder = new EmptyBorder(0, 0, 0, 10); // up, right, bottom, left 
        LineBorder lBorder = new LineBorder(UIManager.getColor("Label.background")); 
        setBorder(BorderFactory.createCompoundBorder(lBorder, eBorder)); 
        
	}
	
}
